home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
bbsutil
/
cntm092b.zip
/
COUNTEM.DOC
< prev
next >
Wrap
Text File
|
1991-09-30
|
10KB
|
304 lines
╓─────╖ ╥─────╖
║ ║
║ ╓──╖ ╥ ╥ ╓─╖ ╥ ╓─╥─╖ ╟── ╓─╥─╖ ║
║ ║ ║ ║ ║ ║ ║ ║ ║ ║ ║ ║ ║ ║
╙─────╜ ╙──╜ ╙──╜ ╨ ╙─╜ ╨ ╨─────╜ ╨ ╨ ╨ o
Version 0.92ß
PCBoard 14.5a DIR File Summary Generator
Copyright 1991 by Michael Nelson
Sysop of SeaHunt BBS
FidoNet 1:125/20 and RBBSNet 8:914/501
October 1, 1991
Countem is a utility to generate summaries of your downloadable
files directories. It will scan your PCBoard system files and
determine which conferences need to have DIR files made, and will
automatically generate them for you. In doing this, several
assumptions are made:
1) Although CountEm opens the PCBoard system files in SHARE
compatible mode, and CountEm does not write to any system files except
the DIR files themselves, you should still make sure all nodes are DOWN
prior to running CountEm. If a caller is on and that caller is reading
a DIR file when CountEm attempts to write to it, you'll get a SHARE
violation, (assuming you have SHARE.EXE loaded). If you DON'T have
SHARE loaded, bad things could happen. So, the moral of the story is,
make sure all nodes are DOWN prior to running CountEm.
2) There isn't much error checking on the COUNTEM.CFG file. An
example COUNTEM.CFG file is included in this archive. Please modify it
to suit your needs. As long as you use an ASCII text file editor
(QEdit works fine, I use Brief and MultiEdit), and don't do stupid
things like putting in a 255 character name for your BBS, nothing
should go wrong. Make SURE the format of your finished file is the
same as in the example file.
3) When changing the colors, please make sure you use VALID PCBoard
14.5 color codes. If you don't, the program will, most likely,
misbehave. There is NO error checking on the color codes. If you put
in valid codes, you'll get valid colors. On the next page of this
document is an excerpt from Clark Development Corp's bulletin "X-CODES"
(available from SaltAir), showing the valid color codes.
-=- PCBoard Color Codes -=-
The @x-color codes correspond to your regular PC display codes.
For instance, a 1 is blue, a 2 is green a 3 is cyan and so on.
The same numbers are used for background colors except that they
are shifted left four bits (to the upper "nibble" of the byte if that
means anything to you). It's easy to picture when you think of it in
HEX rather than decimal numbers like this:
Background (first digit) Foreground (second digit)
------------------------ -------------------------
Black = 0 Black = 0
Blue = 1 Blue = 1
Green = 2 Green = 2
Cyan = 3 Cyan = 3
Red = 4 Red = 4
Magenta = 5 Magenta = 5
Yellow = 6 Yellow = 6
White = 7 White = 7
Background w/Blinking High Intensity Foregounds
Black = 8 Black = 8
Blue = 9 Blue = 9
Green = A Green = A
Cyan = B Cyan = B
Red = C Red = C
Magenta = D Magenta = D
Yellow = E Yellow = E
White = F White = F
Examples:
Bright White on Blue Background = 1F (1=blue,F=white)
Bright Yellow on Green Background = 2E (2=green,E=yellow)
Dark Blue blinking on White Background = F1 (F=white,1=blue)
See how the number in the left colomn represents the background
while the number in the right column represents the foreground? That
is a whole lot easier to remember than to think of "blue background"
being equal to 16, "green background" equal to 32 and "cyan background"
equal to 48 which is what you'd have in decimal.
Combining colors then is much easier to visualize as well - for
instance YELLOW foreground on a BLUE background would be:
1E - where 1=BLUE and E=bright yellow
Instead of thinking of yellow on blue as being the number 30 which
doesn't make any sense at all.
Okay, now to practice what we've learned:
@X00
@x1E = @X1EYELLOW ON BLUE@XFF
@x2F = @X2FWHITE ON GREEN@XFF
@x31 = @X31BLUE ON CYAN@XFF
The COUNTEM.CFG file:
---------------------
The format of COUNTEM.CFG is critical to your success in running
the program. Here's what a sample COUNTEM.CFG looks like:
C:\PCB
S e a H u n t B B S
@X06
@X0D
@X0F
@X0B
@X07
@X0E
@X0E
@X0F
@X03
@X0B
@X03
;------------------------------------------------------------------
; Countem Configuration File
; for Countem v0.92ß
;
; Notes:
; You can put comments in this file, as long as they are below the
; dashed line above, and as long as they have a semicolon in column
; number 1.
;
; There should be NO BLANK LINES in this file
;
; CountEm v0.92ß requires the addition of line 13!!
;
;
; Line 1: Path to PCBOARD.DAT file (no trailing backslash, pls!!)
; Line 2: BBS Name for DIR header
; Line 3: Line drawing character color
; Line 4: BBS Name color
; Line 5: DIR Title color
; Line 6: Header color
; Line 7: Normal color (default is X07, light grey on black)
; Line 8: Directory Number color
; Line 9: Conference Name color
; Line 10: Directory Description color
; Line 11: File Count Color
; Line 12: File Size Color
; Line 13: TimeStamp Color (NEW in v0.92ß)
ErrorLevels:
------------
To make usage in batch files more convenient, CountEm will exit
with various different "errorlevels". An errorlevel of "0" indicates
that the program exited normally. Any other errorlevel returned by the
program indicates a problem of one sort or another. The errorlevels
returned by CountEm are:
99 = Error Opening a File
98 = Syntax Error - Bad Command Line
97 = Error Closing a File
96 = Error Reading a File
95 = Too Many Conferences to Process
94 = Too Many Directories to Process
93 = Unable to Allocate Required Memory
0 = Normal Exit
So, you can trap these errorlevels in a batch file and take
appropriate action if something goes wrong. Proper trapping of
errorlevels in your batch file should help you sleep better at night!
There's a sample batch file you might call CNT.BAT on the next page.
Remember that you need to check errorlevels in descending order. A
typical batch file to run CountEm in your event might look like this:
@ECHO OFF
C:
CD\PCB
COUNTEM COUNTEM.CFG
IF ERRORLEVEL 99 GOTO FILE
IF ERRORLEVEL 98 GOTO COMMAND
IF ERRORLEVEL 97 GOTO CLOSE
IF ERRORLEVEL 96 GOTO READ
IF ERRORLEVEL 95 GOTO CONF
IF ERRORLEVEL 94 GOTO DIRS
IF ERRORLEVEL 93 GOTO MEM
IF ERRORLEVEL 0 GOTO NORM
:FILE
ECHO COUNTEM UNABLE TO OPEN FILE! > COUNTEM.LOG
GOTO END
:COMMAND
ECHO COUNTEM SYNTAX ERROR! > COUNTEM.LOG
GOTO END
:CLOSE
ECHO COUNTEM WAS UNABLE TO CLOSE A FILE! > COUNTEM.LOG
GOTO END
:READ
ECHO COUNTEM WAS UNABLE TO READ A FILE! > COUNTEM.LOG
GOTO END
:CONF
ECHO COUNTEM REPORTED TOO MANY CONFERENCES! > COUNTEM.LOG
GOTO END
:DIRS
ECHO COUNTEM REPORTED TOO MANY DIRECTORIES! > COUNTEM.LOG
GOTO E